<%@taglib uri="/struts-tags" prefix="s"%>
<jcpsm:pageContainer>
<div class="content">

<h1 class="title">Application <span>Configuration</span></h1>
<div id="configDiv" style="width:400px; padding-left: 280px;">
<s:form action="manageConfig">
	<input type="hidden" name="configId" value="${sessionScope.config.configId}"/>
	<table class="track_table" id="configTable">
		<tr>
			<td>Default shift</td>
			<td>
			<select id="owner_display" name="defaultShift" class="syle_input width_222">
				<c:forEach var="shift" items="${sessionScope.shift}">
				<c:if test="${shift.value.deleteFlag eq false}">
						<c:if test="${sessionScope.config.defaultShift eq shift.value.shiftId}">
							<option value="${shift.value.shiftId}" selected="selected">${shift.value.shiftName}</option>
						</c:if>
						<c:if test="${sessionScope.config.defaultShift ne shift.value.shiftId}">
							<option value="${shift.value.shiftId}">${shift.value.shiftName}</option>
						</c:if>
						</c:if>
				</c:forEach>
				</select>
			</td>
		</tr>
		<tr >
			<td>Shift master's Track</td>
			<td><select id="owner_display" name="shiftMastersTrack" class="syle_input width_222">
				<c:forEach var="track" items="${sessionScope.track}">
				<c:if test="${track.value.deleteFlag eq false}">
						<c:if test="${sessionScope.config.shiftMastersTrack eq track.value.trackId}">
							<option value="${track.value.trackId}" selected="selected">${track.value.name}</option>
						</c:if>
						<c:if test="${sessionScope.config.shiftMastersTrack ne track.value.trackId}">
							<option value="${track.value.trackId}">${track.value.name}</option>
						</c:if>
						</c:if>
				</c:forEach>
			</select></td>
		</tr>
		<tr >
			<td>Morning Shift</td>
			<td><select id="owner_display" name="firstShiftId" class="syle_input width_222">
				<c:forEach var="shiftTwo" items="${sessionScope.shift}">
				<c:if test="${shiftTwo.value.deleteFlag eq false}">
						<c:if test="${sessionScope.config.firstShiftId eq shiftTwo.value.shiftId}">
							<option value="${shiftTwo.value.shiftId}" selected="selected">${shiftTwo.value.shiftName}</option>
						</c:if>
						<c:if test="${sessionScope.config.firstShiftId ne shiftTwo.value.shiftId}">
							<option value="${shiftTwo.value.shiftId}">${shiftTwo.value.shiftName}</option>
						</c:if>
						</c:if>
				</c:forEach>
			</select></td>
		</tr>
		<tr >
			<td>Late Shift</td>
			<td><select id="owner_display" name="secondShiftId" class="syle_input width_222">
				<c:forEach var="shiftThree" items="${sessionScope.shift}">
				<c:if test="${shiftThree.value.deleteFlag eq false}">
						<c:if test="${sessionScope.config.secondShiftId eq shiftThree.value.shiftId}">
							<option value="${shiftThree.value.shiftId}" selected="selected">${shiftThree.value.shiftName}</option>
						</c:if>
						<c:if test="${sessionScope.config.secondShiftId ne shiftThree.value.shiftId}">
							<option value="${shiftThree.value.shiftId}">${shiftThree.value.shiftName}</option>
						</c:if>
						</c:if>
				</c:forEach>
			</select></td>
		</tr>
		<tr>
		<td> From Email Id
		</td>
		<td><s:textfield name="fromEmailId"  theme="simple" cssClass="syle_input width_200"  value="%{#session.config.fromEmailId}"/>
		</td>
		</tr>
		<tr>
		<td> Email Subject
		</td>
		<td><s:textfield name="emailSubject"  theme="simple" cssClass="syle_input width_200"   value="%{#session.config.emailSubject}"/>
		</td>
		</tr>
		<tr>
			<td colspan="2">
				<s:submit cssClass="stylebutton mrgrgt50 mrgtp5" value="Save" theme="simple" cssStyle="float:right;"/>
			</td>
		</tr>
		</table>
</s:form>
</div>

</div>
</jcpsm:pageContainer>